
public class ArraySort {

	public static void main(String[] args) {
		
		int[] BeforeSort = {3,7,9,1,0};
		System.out.println("Before Sorting : \n");
		for (int i = 0; i < BeforeSort.length; i++) {
			System.out.println(" " +BeforeSort[i]);
		}
		
		int temp = 0;
		
		for (int i = 0; i < BeforeSort.length; i++) {
			for (int j = 0; j < i; j++){
				if(BeforeSort[j] > BeforeSort[i])
				{
					temp = BeforeSort[i];
					BeforeSort[i] = BeforeSort[j];
					BeforeSort[j] = temp;
				}
			}
		}
		
		System.out.println("After Sorting : \n");
		for (int i = 0; i < BeforeSort.length; i++) {
			System.out.println(" " +BeforeSort[i]);
		}
				
		}
	}